﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="forecastpostmyself_list.aspx.cs" Inherits="forecastpostmyself_list"   MasterPageFile="~/APP_Master/MasterPage_Personal.master"%>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="App_Themes/css/webstyle.css" rel="stylesheet" />
      <link href="css/webstyle.css" rel="stylesheet" />
    <script src="App_Themes/js/jiangjinjisuan/jquery-1.js" type="text/javascript"></script>
    <style type="text/css">
        a:link {color:black}	
        a:visited {color: black}	
        a:hover {color:red}	
    </style>
    <script type="text/javascript">
        function AllSelected(obj)
        {
            var inputs = document.getElementsByTagName("input");
            for (var i = 0; i < inputs.length; i++) {
                if (inputs[i].type == "checkbox") 
                {
                    inputs[i].checked = obj.checked;
                }
            }
        }
        function Delete() {
            var ids = "";
            $('input:checkbox[name=checkbox]:checked').each(function (i) {
                if (0 == i) {
                    ids = $(this).val();
                } else {
                    ids += "," + $(this).val();
                }
            });
            if (ids != "") {
                if (confirm("您确认要删除全部吗？")) {
                    $.ajax({
                            url: '/Ajax/LotteryData.ashx',
                            data: { t: 'DeleYuCe', id: ids },
                            type: "post",
                            dataType: "json",
                            success: function (data) {
                                //window.location.href = window.location.href;
                               // window.location.reload();
                                window.location.href="forecastpostmyself_list.aspx?u=<%=ReadRequest.RequestInt("u") %>";
                            }
                        });
                    }
                }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="jyc_r">
       <div class="jyc_r_title">
            <ul>
                <li><a href="forecastpost_add.aspx" >发布预测</a></li>
                <li class="jyc_r_t"><a href="forecastpostmyself_list.aspx?u=<%=ReadRequest.RequestInt("u") %>" style="color: #fff;">预测管理</a></li>
            </ul>
        </div>
        <table width="82%" border="0" cellspacing="0" cellpadding="0" style="line-height: 35px; font-size: 14px; color: #404040;">
            <tr>
                <td height="50" align="right" valign="top" >文章分类：</td>
                <td align="left" valign="top">
                    <asp:DropDownList ID="lotteryType" runat="server" class="jyc_r_bd1" OnSelectedIndexChanged="LotteryType_SelectedIndexChanged" AutoPostBack="true">
                        <asp:ListItem Value="1">双色球</asp:ListItem>
                        <asp:ListItem Value="2">大乐透</asp:ListItem>
                          <asp:ListItem Value="5">福彩3D</asp:ListItem>
                        <asp:ListItem Value="3">排列三</asp:ListItem>
                          <asp:ListItem Value="4">排列五</asp:ListItem>
                        <asp:ListItem Value="6">七星彩</asp:ListItem>
                          <asp:ListItem Value="7">七乐彩</asp:ListItem>
                    </asp:DropDownList>

                </td>
                <td align="left" valign="top">
                    <asp:DropDownList ID="type" runat="server" class="jyc_r_bd1" OnSelectedIndexChanged="LotteryType_SelectedIndexChanged" AutoPostBack="true">
                        <asp:ListItem Value="1">预测推荐</asp:ListItem>
                        <asp:ListItem Value="2">投注技巧</asp:ListItem>
                          <asp:ListItem Value="3">中奖故事</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td> <div id="box044" class=" per_r_validation"  style="height:42px"><a href="#" onclick="Delete()">删 除</a></div></td>

            </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ycgl">
            <tr class="ycgl_line">
                <td width="5%" height="42" align="center" valign="middle"><input type="checkbox" onclick="AllSelected(this)"/></td>
                <td width="30%" align="left" valign="middle">文章标题</td>
                <td align="center" valign="middle">预测内容</td>
            </tr>
            <% if (forecast != null)
                {
                    for (int i = 0; i < forecast.Count; i++)
                    {%>
            <tr>
                <td height="42" align="center" valign="middle"><input type="checkbox" name="checkbox" value="<%=forecast[i].id %>" />
                </td>
                <td align="left" valign="middle"><a  href="forecastpost_add.aspx?id=<%=forecast[i].id %>"><%=forecast[i].Title.Substring(0, forecast[i].Title.Length > 20 ? 20 : forecast[i].Title.Length) %></a></td>
                <td align="center" valign="middle">
                    <%=forecast[i].Content.Substring(0, forecast[i].Content.Length > 40 ? 40 : forecast[i].Content.Length).Replace("/<[^>]+>/g","") %>
                </td>
            </tr>

            <%}
                }
            %>
        </table>
        <div class="zdgd_page">
            <webdiyer:AspNetPager SubmitButtonClass="buttons" ID="AspNetPager1"
                runat="server" AlwaysShow="True" FirstPageText="首页"
                NextPageText="下一页" PrevPageText="前一页" LastPageText="尾页" PageSize="10"
                OnPageChanged="AspNetPager1_PageChanged">
            </webdiyer:AspNetPager>
        </div>
    </div>
    </div>
    <!--Right-->
</asp:Content>

